﻿


using System;
using System.Collections.Generic;
using System.Collections;
using System.Runtime.Serialization;

namespace UFIDA.U9.Cust.HWProject.CreateAPBillHead.GetCustAPBilListBP
{
	/// <summary>
	/// 应付单监控表查询对象 DTO :自定义的数据传输类型 
	/// 
	/// </summary>
	public  partial class APBilMonitorDTO  : UFSoft.UBF.Business.DTOBase
	{
		#region Constructor
		
		/// <summary>
		/// Constructor
		/// </summary>
		public APBilMonitorDTO(){
			initData();
		}
		private void initData()
		{
		
		
		
					IsSuccess = false; 
					OrderStatus =UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APBilOrderStatusEnum.GetFromValue(0); 

		}

		#endregion
		
		#region Properties
			/// <summary>
		/// 单号 (该属性可为空,且无默认值)
		/// 应付单监控表查询对象.Misc.单号
		/// </summary>
		/// <value>System.String</value>
		public System.String DocNo
		{
			get	
			{	
				return (System.String)base.GetValue("DocNo",typeof(System.String));
			}

			 set	
			{
				base.SetValue("DocNo",value);
			}
		}
				/// <summary>
		/// 来源单号 (该属性可为空,且无默认值)
		/// 应付单监控表查询对象.Misc.来源单号
		/// </summary>
		/// <value>System.String</value>
		public System.String SrcDocNo
		{
			get	
			{	
				return (System.String)base.GetValue("SrcDocNo",typeof(System.String));
			}

			 set	
			{
				base.SetValue("SrcDocNo",value);
			}
		}
				/// <summary>
		/// 发票号 (该属性可为空,且无默认值)
		/// 应付单监控表查询对象.Misc.发票号
		/// </summary>
		/// <value>System.String</value>
		public System.String InvoiceNum
		{
			get	
			{	
				return (System.String)base.GetValue("InvoiceNum",typeof(System.String));
			}

			 set	
			{
				base.SetValue("InvoiceNum",value);
			}
		}
				/// <summary>
		/// 是否推送成功 (该属性可为空,但有默认值)
		/// 应付单监控表查询对象.Misc.是否推送成功
		/// </summary>
		/// <value>System.Boolean</value>
		public System.Boolean IsSuccess
		{
			get	
			{	
				return (System.Boolean)base.GetValue("IsSuccess",typeof(System.Boolean));
			}

			 set	
			{
				base.SetValue("IsSuccess",value);
			}
		}
				/// <summary>
		/// 生单状态 (该属性可为空,但有默认值)
		/// 应付单监控表查询对象.Misc.生单状态
		/// </summary>
		/// <value>UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APBilOrderStatusEnum</value>
		public UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APBilOrderStatusEnum OrderStatus
		{
			get	
			{	
				return (UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APBilOrderStatusEnum)base.GetValue("OrderStatus",typeof(UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APBilOrderStatusEnum));
			}

			 set	
			{
				base.SetValue("OrderStatus",value);
			}
		}
		
		#endregion	
		#region Multi_Fields
					
		#endregion 
		#region  QuaryDTO Add Prop
		private int m_recordCount ;
		public int  RecordCount 
		{
			get {return m_recordCount ;}
			set { m_recordCount = value ;}
		}
		#endregion 

		#region ModelResource
		/// <summary>
		/// 应付单监控表查询对象的显示名称资源--已经废弃，不使用.
		/// </summary>
		public string Res_TypeName {	get {return "" ;}	}
		/// <summary>
		/// 单号的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_DocNo　{ get { return "";　}　}
		/// <summary>
		/// 来源单号的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_SrcDocNo　{ get { return "";　}　}
		/// <summary>
		/// 发票号的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_InvoiceNum　{ get { return "";　}　}
		/// <summary>
		/// 是否推送成功的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_IsSuccess　{ get { return "";　}　}
		/// <summary>
		/// 生单状态的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_OrderStatus　{ get { return "";　}　}
		#endregion 




		#region EntityData exchange
		
		#region  Do SerializeKey -ForDTOType
		//反序化Key到Data的ID中　－－由FromEntityData自动调用，不处理层次关系
		private void DeSerializeKey(APBilMonitorDTOData data)
		{
		





		}

		#endregion 
		
		/// <summary>
		/// Copy Entity From EntityData
		/// </summary>
		public void FromEntityData(APBilMonitorDTOData data)
		{
			this.FromEntityData(data,new Hashtable());
		}
		//used by ubf..
		public void FromEntityData(APBilMonitorDTOData data,IDictionary dict)
		{
			if (data == null)
				return;
			if (dict == null ) dict = new Hashtable() ;
			dict[data] = this;
			DeSerializeKey(data);
			this.RecordCount = data.RecordCount ;
		
			this.DocNo = data.DocNo;

			this.SrcDocNo = data.SrcDocNo;

			this.InvoiceNum = data.InvoiceNum;

			this.IsSuccess = data.IsSuccess;

			this.OrderStatus = UFIDA.U9.Cust.HWProject.CreateAPBillHead.APBil.APBilOrderStatusEnum.GetFromValue(data.OrderStatus);

		}

		/// <summary>
		/// Create EntityData From Entity
		/// </summary>
		public APBilMonitorDTOData ToEntityData()
		{
			return ToEntityData(null,new Hashtable());
		}
		/// <summary>
		/// Create EntityData From Entity - used by ubf 
		/// </summary>
		public APBilMonitorDTOData ToEntityData(APBilMonitorDTOData data, IDictionary dict){
			if (data == null)
				data = new APBilMonitorDTOData();
			if (dict == null ) 
				dict = new Hashtable() ;
			else
            {
                if (dict.Contains(this))
                {
                    data = (APBilMonitorDTOData)dict[this];
                    return data;
                }
            }
			dict[this] = data;
			data.RecordCount = this.RecordCount  ;
		
			data.DocNo = this.DocNo;

			data.SrcDocNo = this.SrcDocNo;

			data.InvoiceNum = this.InvoiceNum;

			data.IsSuccess = this.IsSuccess;

			if (this.OrderStatus!=null)
			{
				data.OrderStatus = this.OrderStatus.Value;
			}

			return data ;
		}

		#endregion	
	}	
	
}